import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'

const router = createRouter({
  routes:[
    {
      path:'/',
      redirect:'/article'
    },
    {
      path:'/article',
      name:'article',
      redirect:'/article/list',
      children:[
        {
          path:'list',
          component:()=>import('../views/Article/index.vue')
        },
        {
          path:'edit',
          name:'article_edit',
          component:()=>import('../components/ArticleEditor/index.vue')
        },
      ]
    },
    {
      path:'/resource',
      name:'resource',
      component:()=>import('../views/Resource/index.vue'),

    },
    {
      path:'/label',
      name:'label',
      component:()=>import('../views/Label/index.vue'),

    },
    {
      path:'/sort',
      name:'sort',
      component:()=>import('../views/Sort/index.vue'),

    },

  ],
  history: createWebHashHistory()
})
export default router
